package com.zy.demo048084.service;

import com.zy.demo048084.pojo.po.DepartPo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "demo2", path = "/depart",fallback = Demo2ServiceFallback.class)
public interface Demo2Service {

    @PostMapping("/")
    boolean save(@RequestBody DepartPo po);

    @DeleteMapping("/{id}")
    boolean delete(@PathVariable("id") Long id);

    @PutMapping("/")
    boolean modify(@RequestBody DepartPo po);

    @GetMapping("/{id}")
    DepartPo getById(@PathVariable("id") Long id);

    @GetMapping("/list")
    List<DepartPo> getAll();
}
